x86/PV: split out dealing with DRn from privileged instruction handling
authorJan Beulich <jbeulich@suse.com>
Fri, 30 Sep 2016 07:55:08 +0000 (09:55 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 30 Sep 2016 07:55:08 +0000 (09:55 +0200)
commit39b682388bb37688bd969e27240e2696246205cd
tree7c4c5ba04bccdb8e2e76c9e086f75e255683c3e5
parentf745527379e414299732995cde221eeb7068f022
x86/PV: split out dealing with DRn from privileged instruction handling

This is in preparation for using the generic emulator here.

Some care is needed temporarily to not unduly alter guest register
state: The local variable "res" can only go away once this code got
fully switched over to using x86_emulate().

Also switch to IS_ERR_VALUE() instead of (incorrectly) open coding it.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/traps.c